package 线程.综合练习.抽奖箱抽奖;

import java.util.ArrayList;
import java.util.Collections;

public class Text {
    public static void main(String[] args) {
        //定义一个奖池的对象
        ArrayList<Integer> list=new ArrayList<>();
        Collections.addAll(list,10,5,20,50,100,200,500,800,2,80,300,700);
        //创建线程的对象
        MTh mt1=new MTh(list);
        MTh mt2=new MTh(list);

        //设置抽奖箱子的名字
        mt1.setName("抽奖箱1");
        mt2.setName("抽奖箱2");

        mt2.setPriority(8);

        //开启线程
        mt1.start();
        mt2.start();
    }
}
